<template>
  <div class="js-tabItem2">
    <img class="js-tabItem2-bg" :src="config.bg" />
    <div class="js-tabItem2-content">
      <div class="js-tabItem2-content-label">
        {{ config.label }}
      </div>
      <div class="js-tabItem2-content-val">
        <div class="js-tabItem2-content-val-num">
          {{ value }}
        </div>
        {{ config.unit }}
      </div>
    </div>
    <div class="js-tabItem2-icon">
      <img :src="config.icon" />
    </div>
  </div>
</template>
<script>
export default {
  props: {
    config: {
      type: Object
    },
    value: {
      type: [Number, String],
      default: 0
    }
  }
}
</script>
<style lang="scss">
.js-tabItem2 {
  width: calc(25% - 12px);
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 0 24px;
  position: relative;
  &-bg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
  }
  &-icon {
    width: 66px;
    height: 66px;
    z-index: 1;
    img {
      width: 100%;
      height: 100%;
    }
  }
  &-content {
    z-index: 1;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    &-label {
      font-size: 14px;
      line-height: 14px;
      font-weight: 500;
      color: #ffffff;
      margin-bottom: 22px;
    }
    &-val {
      display: flex;
      align-items: flex-end;
      justify-content: flex-start;
      font-size: 14px;
      line-height: 14px;
      font-weight: 500;
      color: #ffffff;
      margin-bottom: 3px;
      &-num {
        font-size: 20px;
        line-height: 20px;
        font-family: DIN;
        font-weight: bold;
        color: #ffffff;
        margin: 0 5px -2px 0;
      }
    }
  }
}
</style>
